Single modifier shortcuts now possible!#136
Single modifier shortcuts now possible!#136ansonkao wants to merge 2 commits intomadrobby:masterfrom
Conversation
|
Addresses Issue #103 |
|
Okay, after further testing, it turns out my patch is no good. If you hold down the modifier keys, after half a second you start receiving multiple events kinda like thisssssssssssssssssssssssssss if you hold down on the 'S'. Need logic around that. Would appreciate if the owners of the repo can give me advice on whether or not my hack makes any sense or not! |
That should be just default behavior, as I had to add in some extra glue to prevent quick repeats on my keybinds when adding keymaster to a project recently. I don't think the library actually supports single keypress binds (eg. |
|
@Daiz- you're right, thanks. I'll have to tackle the repeats issue separately. In that case, any thoughts on my patch? Regarding single modifier shortcuts |
|
+1 It is sometimes essential to be able to bind to "modifier" keys individually. E.g. make something happen on keydown of |
This change allows the possibility of doing
key('ctrl', function(){ ... });which the prior logic would actually interpret askey('c', function(){ ... });